<?php
return [
    'id' => 'app-backend-ico',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => [
        'log',
        'dektrium\user\Bootstrap',
        'dektrium\rbac\Bootstrap',
    ],
    'runtimePath' => __DIR__ . '/../runtime',
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
        ],
        'gii' => [
            'class' => 'yii\gii\Module',
            'allowedIPs' => [
                '192.168.*.*',
                '112.65.102.247',
                '127.0.0.*', '::1'
            ]
        ]
    ],
    'components' => [
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => true,
            'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
        ],
        'i18n' => [
            'translations' => [
                'user' => [
                    'class' => 'yii\i18n\PhpMessageSource',
                    'basePath' => '@dektrium/user/messages'
                ],
            ],
        ],
        'request' => [
            'csrfParam' => '_csrf-ico-backend',
            'cookieValidationKey' => 'eKLYlWKOENcC6UwmnPJhJUraP3h8HzOf',
        ],
        'session' => [
            // this is the name of the session cookie used for login on the backend
            'name' => 'advanced-backend-ico' . date('ymd'),
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
            ],
        ],
    ],
    'params' => require __DIR__ . '/params.php',
];
